﻿
Public Class BlogPost
    Implements IComparable(Of BlogPost)

#Region " Declarations "

    Private _datDatePublished As DateTime
    Private _strAuthor As String = String.Empty
    Private _strCategory As String = String.Empty
    Private _strTitle As String = String.Empty
    Private _strURL As String = String.Empty

#End Region

#Region " Properties "

    Public Property Author() As String
        Get
            Return _strAuthor
        End Get
        Set(ByVal Value As String)
            _strAuthor = Value
        End Set
    End Property

    Public Property Category() As String
        Get
            Return _strCategory
        End Get
        Set(ByVal Value As String)
            _strCategory = Value
        End Set
    End Property

    Public Property DatePublished() As DateTime
        Get
            Return _datDatePublished
        End Get
        Set(ByVal Value As DateTime)
            _datDatePublished = Value
        End Set
    End Property

    Public Property Title() As String
        Get
            Return _strTitle
        End Get
        Set(ByVal Value As String)
            _strTitle = Value
        End Set
    End Property

    Public Property URL() As String
        Get
            Return _strURL
        End Get
        Set(ByVal Value As String)
            _strURL = Value
        End Set
    End Property

#End Region

#Region " Constructor "

    Public Sub New()
    End Sub

#End Region

#Region " Methods "

    Public Function CompareTo(ByVal other As BlogPost) As Integer Implements System.IComparable(Of BlogPost).CompareTo
        Return other.DatePublished.CompareTo(Me.DatePublished)
    End Function

#End Region

End Class
